<template>
    <div class="login-wrap">
       6666
    </div>
</template>

<script>
import Pagination from '@/components/Pagination';
import ajax from '@/utils/myajax';
import $ from 'jquery';
import axios from 'axios';
export default {
    components: { Pagination },
    data() {
        return {
          
            listQuery: {
                pageNo: 1,
                pageSize: 10
            },
            ruleForm: {
                name: '',
                remark: '',
                department_id: '',
                department_name: '',
                content:''
            },
            rules: {
                name: [{ required: true, message: '请输入工种名称', trigger: 'blur' }],
                phone: [{ required: true, message: '请输入电话', trigger: 'blur' }],
                percount: [{ required: true, message: '请输入部门人数数量', trigger: 'blur' }],
                department_id: [{ required: true, message: '请输入部门id', trigger: 'blur' }],
               
                content: [{ required: true, message: '请输入工作内容', trigger: 'blur' }],
            }
        };
    },
    methods: {
      
        submitForm(formName) {
            this.$refs[formName].validate(valid => {
                if (valid) {
                    let me = this;
                    

                    ajax('worktype/add_worktype', this.ruleForm, function(data) {
                        me.$message({
                            title: '成功',
                            message: "创建成功",
                            type: 'success'
                        });
                        (me.ruleForm.name = ''),
                            me.ruleForm.name = '',
                            me.ruleForm.department_id = '',
                            me.ruleForm.remark = '';
                             me.ruleForm.content = '';
                    });
                }
            });
        },
        resetForm(formName) {
            this.$refs[formName].resetFields();
        }
    },
    created() {
        
    }
};
</script>

<style scoped>
.login-wrap {
    position: relative;
    width: 94%;
    height: 650px;
    margin-left: 2%;
    padding-top: 100px;
    padding-left: 50px;
}
</style>